-- GENERATED SPELL FOR [Shattered Hand Heathen] --


function spell0_17420(pUnit, Event) --@Bloodthirst,n/a--
pUnit:FullCastSpellOnTarget(30474,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17420', 0, 1)
end

function spell1_17420(pUnit, Event) --@Bloodthirst,n/a--
pUnit:FullCastSpellOnTarget(35949,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17420', 0, 1)
end

function spell2_17420(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(30485,pUnit)
pUnit:RegisterEvent('Sorts_17420', 570, 1)
end

function Sorts_17420(pUnit, Event)
local choix_sorts_17420 = math.random(0, 2)
if choix_sorts_17420 == 0 then
pUnit:RegisterEvent('spell0_17420', 1, 1)
end
if choix_sorts_17420 == 1 then
pUnit:RegisterEvent('spell1_17420', 1, 1)
end
if choix_sorts_17420 == 2 then
pUnit:RegisterEvent('spell2_17420', 1, 1)
end
end

function mob17420_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17420', math.random(1500, 3000), 1)
end

function mob17420_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17420_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17420_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17420, 1, 'mob17420_Action')
RegisterUnitEvent(17420, 2, 'mob17420_Leave')
RegisterUnitEvent(17420, 3, 'mob17420_Kill')
RegisterUnitEvent(17420, 4, 'mob17420_Die')
